Factorial push ebp mov ebp, esp ; preserving ebp mov eax, [ebp+8] ; get n cmp eax, 0 ; n>0? ja L1 ;yes continue mov eax, 1 ; no return 1 jmp L2 L1 dec eax push eax ;factorial n-1 call Factorial ; Instructions from this point on execute ;when each recursive call returns ReturnFact mov ebx, [ebp+8] ; get n mul ebx ; ax= ax * bx L2 pop ebp ret 4 ; end of procedure factorial